package dicky.fortunetelling;


import dicky.fortunetelling.R;

import android.app.Activity;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class about extends Activity {
	
	private TextView version;
	private String tag=about.class.getSimpleName();
	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.about);
        setTitle("关于"+getTitle());
        
        version=(TextView)findViewById(R.id.version);
        
        try {
        	String packagename=getPackageName();
			int ver_code = getPackageManager().getPackageInfo(
					packagename, 0).versionCode;
			String ver_name = getPackageManager().getPackageInfo(
					packagename, 0).versionName;
			version.setText(ver_name+" 版");
			
		} catch (Exception e) {
			e.printStackTrace();
			Log.d(tag, e.toString());
		}
		
        
        
    }
}
